<?php
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg1'].'" WHERE ti_id=1;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg2'].'" WHERE ti_id=2;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg3'].'" WHERE ti_id=3;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg4'].'" WHERE ti_id=4;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg5'].'" WHERE ti_id=5;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg6'].'" WHERE ti_id=6;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg7'].'" WHERE ti_id=7;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg8'].'" WHERE ti_id=8;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg9'].'" WHERE ti_id=9;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg10'].'" WHERE ti_id=10;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg11'].'" WHERE ti_id=11;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg12'].'" WHERE ti_id=12;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg13'].'" WHERE ti_id=13;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg14'].'" WHERE ti_id=14;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg15'].'" WHERE ti_id=15;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg16'].'" WHERE ti_id=16;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg17'].'" WHERE ti_id=17;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg18'].'" WHERE ti_id=18;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg19'].'" WHERE ti_id=19;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg20'].'" WHERE ti_id=20;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg21'].'" WHERE ti_id=21;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg22'].'" WHERE ti_id=22;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg23'].'" WHERE ti_id=23;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg24'].'" WHERE ti_id=24;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg25'].'" WHERE ti_id=25;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg26'].'" WHERE ti_id=26;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg27'].'" WHERE ti_id=27;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg28'].'" WHERE ti_id=28;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg29'].'" WHERE ti_id=29;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg30'].'" WHERE ti_id=30;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg31'].'" WHERE ti_id=31;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg32'].'" WHERE ti_id=32;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg33'].'" WHERE ti_id=33;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg34'].'" WHERE ti_id=34;';
    $result = $db->Execute($sql);
    $sql = 'UPDATE technical_information SET ti_data="'.$_POST['msg35'].'" WHERE ti_id=35;';
    $result = $db->Execute($sql);
    
    if($result){
        $msg = 'บันทึกข้อมูลเรียบร้อยแล้ว';
    }else{
        $msg = 'ไม่สามารถบันทึกข้อมูลได้';
    }
?>

<?php
    include('header.php');
    include('submenu.php');
?>
<div class="grid_18" id="contents">
    <div id="query_result">
    <?php
        echo $msg , ' <img src="images/ajax-loader.gif" />';
        redirect('?m=product&s=technical-information',3);
    ?>
    </div>
</div><!-- end .grid_18 -->
<div class="clear">&nbsp;</div>
<?php
    include('footer.php');
?>